<?php

namespace app\web\model;

use think\Db;
use think\Model;

class GuestbookModel extends Model
{

    // 设置数据表（不含前缀）
    protected $name = 'guestbook';
    // 设置当前模型对应的完整数据表名称
    protected $table = 'ld_guestbook';

    public function __construct($data = [])
    {
        parent::__construct($data);
    }
    
    /**
     * @param $userid
     * @param $probleid
     * @param 获取当前留言
     */
    public function conectlist($where){
        $query = Db::name($this->name)->alias('a')->join('adminuser b','a.userid=b.id','left')->join('poblem_table c','a.probleid=c.id','left')->where($where)->field('a.*,b.username,b.position')->select();
        return $query;
    }
    
}